Skip to content

test(work): isolate lock lifetime checks from parallel forks - #1279

Merged
oxa-orchestrator[bot] merged 2 commits into
mainfrom
agent/1265-lock-test-flakes
Nov 18, 2026
Merged

oxa-orchestrator[bot] merged 2 commits into
mainfrom
agent/1265-lock-test-flakes

Conversation

@oxa-agent

@oxa-agent oxa-agent Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Fixes the lock-lifetime test flakes reported while qualifying #1265. T1 (test-only).

Linux flock locks belong to an open file description. A parallel libtest test can fork while another test holds a lock; CLOEXEC closes the inherited descriptor at exec. Dropping every intended owner therefore does not guarantee an immediate reopen can acquire the lock. This affects the exact durable native-completion assertion and both shadow admission replay/reopen tests. Widening the fork-to-exec window also exposed the adjacent native queue settlement test.

Run these four existing tests individually in a fresh, environment-cleared test process. Their locks are created after exec without unrelated test peers; the helper verifies exactly one passing test. All original assertions and real lock operations are preserved byte for byte. The test inventory remains exactly 106 library tests. The 49-line change is entirely test infrastructure; production behavior is unchanged.

Validation at exact head 6ac4025caa3d7c6f4ac54b2a47cca53786ff4c71:

  • Before: clean main b72f5fc189a407d918a2426375f4b5ebcc39d40c. A controlled probe retaining fork-inherited descriptors reproduces both shadow already in use errors and native completion WouldBlock. A 500ms fork-to-exec delay in the full parallel library suite exposes the adjacent native queue settlement assertion (105 passed, 1 failed). Eight uninstrumented full library runs passed; the reported natural 2-of-4 failure rate was not reproduced.
  • After, on the explicitly authorized remote host: 50 normal + 50 delayed-fork focused rounds, each running all four repaired tests alongside the managed-steering fork/exec control with five test threads: 500/500 cases passed. Four complete library runs with 16 test threads: 106/106 passed each, zero ignored or failed. Isolated HOME/XDG/TMPDIR, niced compilation with three build jobs. Transferred source hashes match the exact committed head.
  • Selected crates: oxa-work, oxa-cli, oxa-parity. Lane 44225113910 SUCCESS on x86_64 and ARM64: 1,560/1,560 passed, zero skipped on each architecture, including all four repaired tests.
  • Required checks 44225178658 SUCCESS, including formatting, strict clippy, scans, mandatory-bwrap workspace partitions, inventory validation and the final gate.
  • git diff --check and scoped rustfmt --check pass. CI was started by ordinary branch pushes/PR creation; no manual dispatch or restart.

@oxa-agent oxa-agent Bot mentioned this pull request Nov 18, 2026
@n0rpan

n0rpan commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

@codex review

@n0rpan

n0rpan commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

@codex security review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T02:46:51.453156Z 6ac4025 Manual request
🔒 Security Review ✅ Completed 2026-11-18T02:47:37.970026Z 6ac4025 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 6ac4025caa

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 6ac4025caa

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@oxa-orchestrator
oxa-orchestrator Bot added this pull request to the merge queue Nov 18, 2026
Merged via the queue into main with commit 6750a5d Nov 18, 2026
30 checks passed
@oxa-orchestrator
oxa-orchestrator Bot deleted the agent/1265-lock-test-flakes branch November 18, 2026 03:03
oxa-agent Bot pushed a commit that referenced this pull request Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant